﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.Serialization;
using System.Xml.Serialization;
using System.Xml;
using System.Reflection;
using BlueLotus7.ArchiveSystem.Interfaces;
using System.Globalization;

namespace BlueLotus7.ArchiveSystem.Common
{
    public class SubOperationTask : BaseArchiveTask
    {
        protected ReportableTask owner;

        public ReportableTask Owner
        {
            get
            {
                return owner;
            }
        }

        public SubOperationTask(ReportableTask ownerTask)
        {
            this.owner = ownerTask;
        }

        protected override void FillRecordInfo(TaskExecutionRecord record)
        {
            record.TaskKey = this.owner.Key;
        }

        protected void UpdateOwnerExecutionStamp()
        {
            owner.LastExecutedStamp = DateTime.Now;
        }
    }
}
